Azure Machine Learning provides a cloud-based
service that offers flexibility in how you use it. There are user interfaces specifically designed for
Azure Machine Learning, or you can use a programmatic
interface to manage workspace resources and run
machine learning operations. You can manage the assets in your Azure Machine
Learning workspace in the Azure portal. However, as this is
a general interface for managing all
resources in Azure, data scientists and
other users involved in machine learning
operations may prefer to use a more focused
dedicated interface. Azure Machine Learning Studio is a web-based tool for managing an Azure Machine
Learning workspace. It enables you to
create, manage, and view all of the assets
in your workspace and provides the following
graphical tools: Designer. This is a drag-and-drop
interface for no code machine learning
model development. Automated machine learning. This is a wizard interface that enables you to train a model, using a combination of algorithms and data
pre-processing techniques to find the best
model for your data. It's important to note that a previously released tool named Azure Machine Learning
Studio provided a free service for drag and drop machine learning
model development. The studio interface for the Azure Machine
Learning Service includes this capability
in the designer tool, as well as other workspace
asset management capabilities. To use Azure Machine
Learning Studio, use a web browser to navigate to ml.azure.com and sign in using credentials associated with your Azure subscription. You can then select
the subscription and workspace you
want to manage. While graphical interfaces like Azure Machine Learning Studio make it easy to create and manage machine learning assets, it is often advantageous to use a code-based approach
to managing resources. By writing scripts to create
and manage resources, you can run machine
learning operations from your preferred
development environment. Automate asset creation and configuration to
make it repeatable, ensure consistency
for resources that must be replicated in
multiple environments. For example, development,
test, and production. Incorporate machine learning
asset configuration into developer operations
or DevOps workflows, such as continuous integration, continuous deployment,
or CICD Pipelines. Azure Machine Learning provides software development kits
or SDKs for Python and R, which you can use
to create, manage, and use assets in an Azure
Machine Learning workspace. Note that this course focuses on the Python SDK because it has broader capabilities
than the R SDK. Let's now learn how to install the Azure Machine
Learning SDK for Python. You can install the Azure
Machine Learning SDK for Python by using the pip package
management utility and using the pip
install command. The SDK is installed using the Python pip utility
and consists of the main azureml-sdk
package as well as numerous other
ancillary packages that contain specialized
functionality. For example, the Azure-ml
widgets package provides support for interactive widgets in a Jupyter Notebook
environment. To install additional packages, include them in the
pip install command. For more information
about installing the Azure Machine
Learning SDK for Python, see the SDK documentation
from the Microsoft website. You can find a link
to this document from the additional readings at
the end of this lesson. Also, you should be aware
that the SDK is updated on a regular basis and review the release notes for
the latest release. You can find a link
to this document from the additional readings
at the end of this lesson. After installing the SDK package in your Python environment, you can write code to connect to your workspace and perform
machine learning operations. The easiest way to
connect to a workspace is to use a workspace
configuration file, which includes the
Azure subscription, resource group, and
workspace details. You can download a configuration file for a workspace from the overview page
of its blade in the Azure portal or from Azure
Machine Learning Studio. To connect to the workspace
using the configuration file, you can use the
from_config method of the workspace
class in the SDK. By default, the from_config
method looks for a file named config.json in the folder containing the Python code file, but you can specify
another path if necessary. As an alternative to using
a configuration file, you can use the Get method
of the workspace class, which explicitly
specifies subscription, resource group, and
workspace details. However, the configuration
file technique is generally preferred due to its greater flexibility when using multiple scripts. Whichever technique you use, if there is no current
active session with your Azure subscription, you'll be prompted
to authenticate. The workspace class is the starting point for
most code operations. For example, you can use its compute targets attributes to retrieve a dictionary object, containing the compute targets
defined in the workspace. The SDK contains a rich library of classes that you
can use to create, manage, and use many assets in Azure Machine
Learning workspace. For more information about
the compute targets, Azure Machine Learning SDK, see the SDK documentation
from the Microsoft website. You can find a link
to this document from the additional readings at
the end of this lesson. The Azure Command Line
Interface, or CLI, is a cross-platform
command-line tool for managing Azure resources. The Azure Machine
Learning CLI extension is an additional package
that provides commands for working with
Azure Machine Learning. To install the Azure Machine
Learning CLI extension, you must first install
the Azure CLI. See the full installation
instructions for all supported platforms
for more details. You can find a link
to this document from the additional readings at
the end of this lesson. After installing the Azure CLI, you can add the Azure Machine
Learning CLI extension by running an az
extension command. To use the Azure Machine
Learning CLI extension, run the az ml command with the appropriate parameters for the action you want to perform. It is important to
note the following, in the code sample above, the -g parameter specifies the name of the
resource group in which the Azure Machine
Learning workspace specified in the -w
parameter is defined. These parameters are
shortened aliases for --resource group
and --workspace name. For more information about the Azure Machine
Learning CLI extension, see the documentation. You can find a link
to this document from the additional readings at
the end of this lesson. Azure Machine Learning
includes the ability to create compute instances
in a workspace, to provide a development
environment that is managed with all of the other
assets in the workspace. Compute instances include, Jupyter Notebook and Jupyter lab installations that you
can use to write and run code that uses the Azure
Machine Learning SDK to work with assets
in your workspace. You can choose a
compute instance image that provides the compute
specification you need, from small CPU-only VMs to large GPU-enabled
workstations. Because compute instances
are hosted in Azure, you only pay for the compute resources when they are running, so you can create a compute
instance to suit your needs. Stop it when your workload has completed to minimize costs. You can store notebooks
independently in workspace storage and open
them in any compute instance. Visual Studio Code is a lightweight code
editing environment for Microsoft Windows, Apple MAC OS, and Linux. It provides a visual interface
for many kinds of code, including Microsoft C#, JavaScript, Python, and others. It also provides Intellisense
and syntax formatting for common data formats
such as JSON and XML. Visual Studio Code's flexibility is based on the ability to install modular extensions
that add syntax checking, debugging, and visual management interfaces for
specific workloads. For example, the Microsoft
Python extension for Visual Studio Code, adds support for writing and running Python code
and scripts or notebooks within the Visual
Studio Code interface. The Azure Machine
Learning extension for Visual Studio Code provides a graphical interface
for working with assets in an Azure Machine
Learning workspace. You can combine the
capabilities of the Azure Machine Learning and Python extensions to manage a complete end-to-end
machine learning workload in Azure Machine Learning from the Visual Studio
Code environment. For more information about using the Azure Machine
Learning extension for Visual Studio Code,
see the documentation. You can find a link
to this document from the additional readings
at the end of this lesson.